package finalproject.bd1.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the order_service database table.
 * 
 */
@Entity
@Table(name="order_service")
public class OrderService extends AbstractEntity implements Serializable {
	private static final long serialVersionUID = 1L;

//	@Id
//	@SequenceGenerator(name="ORDER_SERVICE_ID_GENERATOR", sequenceName="ORDER_SERVICE_ID_SEQ")
//	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ORDER_SERVICE_ID_GENERATOR")
//	@Column(unique=true, nullable=false)
//	private Integer id;

	@Temporal(TemporalType.DATE)
	@Column(name="os_arrival_date")
	private Date osArrivalDate;

	@Temporal(TemporalType.DATE)
	@Column(name="os_expected_delivery")
	private Date osExpectedDelivery;

	@Column(name="os_hard_disk", length=20)
	private String osHardDisk;

	@Column(name="os_note", length=150)
	private String osNote;

	@Column(name="os_operating_system", length=30)
	private String osOperatingSystem;

	@Temporal(TemporalType.DATE)
	@Column(name="os_output_date")
	private Date osOutputDate;

	@Column(name="os_problem_found", length=200)
	private String osProblemFound;

	@Column(name="os_processor", length=30)
	private String osProcessor;

	@Column(name="os_ram_memory", length=5)
	private String osRamMemory;

	@Column(name="os_reported_problem", length=200)
	private String osReportedProblem;

	@Column(name="os_status", length=15)
	private String osStatus;

	//bi-directional many-to-one association to ExecutionService
	@OneToMany(mappedBy="orderService")
	private List<ExecutionService> executionServices;

	//bi-directional many-to-one association to Client
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="client_id", nullable=false)
	private Client client;

	//bi-directional many-to-one association to Employee
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="employee_id", nullable=false)
	private Employee employee;

	public OrderService() {
	}

//	public Integer getId() {
//		return this.id;
//	}
//
//	public void setId(Integer id) {
//		this.id = id;
//	}

	public Date getOsArrivalDate() {
		return this.osArrivalDate;
	}

	public void setOsArrivalDate(Date osArrivalDate) {
		this.osArrivalDate = osArrivalDate;
	}

	public Date getOsExpectedDelivery() {
		return this.osExpectedDelivery;
	}

	public void setOsExpectedDelivery(Date osExpectedDelivery) {
		this.osExpectedDelivery = osExpectedDelivery;
	}

	public String getOsHardDisk() {
		return this.osHardDisk;
	}

	public void setOsHardDisk(String osHardDisk) {
		this.osHardDisk = osHardDisk;
	}

	public String getOsNote() {
		return this.osNote;
	}

	public void setOsNote(String osNote) {
		this.osNote = osNote;
	}

	public String getOsOperatingSystem() {
		return this.osOperatingSystem;
	}

	public void setOsOperatingSystem(String osOperatingSystem) {
		this.osOperatingSystem = osOperatingSystem;
	}

	public Date getOsOutputDate() {
		return this.osOutputDate;
	}

	public void setOsOutputDate(Date osOutputDate) {
		this.osOutputDate = osOutputDate;
	}

	public String getOsProblemFound() {
		return this.osProblemFound;
	}

	public void setOsProblemFound(String osProblemFound) {
		this.osProblemFound = osProblemFound;
	}

	public String getOsProcessor() {
		return this.osProcessor;
	}

	public void setOsProcessor(String osProcessor) {
		this.osProcessor = osProcessor;
	}

	public String getOsRamMemory() {
		return this.osRamMemory;
	}

	public void setOsRamMemory(String osRamMemory) {
		this.osRamMemory = osRamMemory;
	}

	public String getOsReportedProblem() {
		return this.osReportedProblem;
	}

	public void setOsReportedProblem(String osReportedProblem) {
		this.osReportedProblem = osReportedProblem;
	}

	public String getOsStatus() {
		return this.osStatus;
	}

	public void setOsStatus(String osStatus) {
		this.osStatus = osStatus;
	}

	public List<ExecutionService> getExecutionServices() {
		return this.executionServices;
	}

	public void setExecutionServices(List<ExecutionService> executionServices) {
		this.executionServices = executionServices;
	}

	public Client getClient() {
		return this.client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	public Employee getEmployee() {
		return this.employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

}